<template>
    <div>
        <Card :bordered="false" dis-hover class="ivu-mt" ref="card">
            <query-form ref="form" @on-submit="getData" @on-reset="getData" />
            <table-list ref="table" @on-fullscreen="handleFullscreen" />
        </Card>
    </div>
</template>
<script>
    import screenfull from 'screenfull';
    import tableList from './list';
    import queryForm from './queryForm';

    export default {
        name: 'org-emp',
        components: { tableList,queryForm },
        data () {
            return {

            }
        },
        methods: {
            getData(queryParams){
                 this.$refs.table.getData(queryParams);
            },
            handleFullscreen (state) {
                if (state) {
                    screenfull.request(this.$refs.card.$el);
                } else {
                    screenfull.exit();
                }
            }
        },
        mounted () {
        }
    }
</script>